package com.ndp.fb.rdb.api;

import com.ndp.fb.model.rdb.AudienceManager;
import com.ndp.fb.rdb.model.Pager;

import java.util.List;

/**
 * Created by sisi.chen on 2016/4/20.
 */
public interface AudienceManagerRdbService {
    Long save(AudienceManager audienceManager);
    Pager<AudienceManager> findByUserId(String userId, Integer firstResult, Integer sizeNo);

    AudienceManager findById(Long id);

    List<AudienceManager> findByUserIdAndWeFeedIdAndName(String userId, Long weFeedId, String name);

    Pager<AudienceManager> findByFeed(Long weFeedId, Integer firstResult, Integer sizeNo);

    List<AudienceManager> findAll();

    List<AudienceManager> findAllByFeed(Long weFeedId);

    void update(AudienceManager audienceManager);

    List<AudienceManager> findAllByFeedAndFbAccountId(Long weFeedId, Long fbAccountId);

    List<AudienceManager> findByUserIdAndWeFeedIdAndAndFbAccountIdName(String userId, Long weFeedId, Long fbAccountId, String name);

    List<AudienceManager> findByWeFeedIdAndNames(String feedId, List<String> audienceTemplate);

    List<AudienceManager> findByIds(Object[] objects);
}
